package com.yunxi.job;

import com.yunxi.qrtz.service.VehicleLendOrderJobDubboService;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import java.util.Date;

/**
 * 车辆借车单超期提醒定时任务
 */
@DisallowConcurrentExecution
public class VehicleLendOrderJob implements BaseJob {  
  
    private static Logger _log = LoggerFactory.getLogger(VehicleLendOrderJob.class);

    @Autowired
    @Qualifier(value = "vehicleLendOrderJobDubboServiceI")
    VehicleLendOrderJobDubboService vehicleLendOrderJobDubboService;
     
    public VehicleLendOrderJob() {  
          
    }  
     
    public void execute(JobExecutionContext context)  
        throws JobExecutionException{
        _log.debug("Hello Job执行时间: " + new Date());
        _log.debug("借车超期提醒定时任务开始========");
        try {
            vehicleLendOrderJobDubboService.remindOverTimeLendOrder();
        }
        catch (Exception e){
            e.printStackTrace();
        }
        _log.debug("借车超期提醒定时任务结束========");
    }  
}  
